﻿#ifndef PACKBUFFER_HPP
#define PACKBUFFER_HPP

#include <string>
#include <vector>
#include "common.h"

namespace mv {
const int MIN_SIZE = 4;

class pack_buffer {
public:
	pack_buffer();
	bool append_and_parse(uint8_t* buf, int32_t buflen, std::vector<std::vector<uint8_t> >& packs);
	bool append_and_parse(uint8_t* buf, int bufoffset, int32_t buflen, std::vector<std::vector<uint8_t> >& packs);
private:
	int buffer_length_ = -1;
	int offset_ = 0;
	std::vector<uint8_t> buffer_;
};
} // namespace mv

#endif // !PACKBUFFER_HPP
